Package-level declarations

Types

Link copied to clipboard
data class Color(var r: Float = 0.0f, var g: Float = 0.0f, var b: Float = 0.0f)

An RGB color

Link copied to clipboard
data class HDRImage(val width: Int = 1, val height: Int = 1, var pixels: Array<Color> = Array(width * height) { Color() })

Represents a High Dynamic Range (HDR) image stored in row-major order.

Link copied to clipboard
class InvalidPFMImageFormat(message: String = "Invalid PFM format") : Exception

Exception thrown when a file or stream does not perfectly match the expected Portable FloatMap (PFM) specification.

Link copied to clipboard
data class Parameters(val inputFileName: String = "", val factor: Float = 0.2f, val gamma: Float = 1.0f, val outputFileName: String = "")

Parse inputs for main. inputFileName for the image location, factor and gamma for normalizing the images and outputFileName to save the produced image.

Functions

Link copied to clipboard
fun areClose(x: Float, y: Float, epsilon: Float = 1.0E-5f): Boolean

Checks if two Float and y are within epsilon.

Link copied to clipboard
fun byteArrayOfInts(vararg ints: Int): ByteArray

Creates a ByteArray from a variable number of integer arguments. Useful for inline hexadecimal array initialization.

Link copied to clipboard
fun main(args: Array<String>)